package kr.hkit.android_caloriecheck;

import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.Fragment;
import android.app.FragmentTransaction;

public class Tablistener implements ActionBar.TabListener {
	private Fragment mFragment;
	private String mTag;

	public Tablistener(Fragment fragment, String tag) {
		mFragment = fragment;
		mTag = tag;
	}

	public void onTabSelected(Tab tab, FragmentTransaction ft) {
		ft.add(R.id.frame, mFragment, mTag);

	}

	public void onTabUnselected(Tab tab, FragmentTransaction ft) {
		ft.remove(mFragment);
	}

	public void onTabReselected(Tab tab, FragmentTransaction ft) {
	}

}
